<script type="text/javascript">
    function sendErrorMessages() {
        var contractId = $("#contractId").val();
        var companyId = $("#companyId").val();
        var str = "";
        $.each($('input:checkbox:checked'),function(){
            str += $(this).val() + ",";
        });
        if ($('input:checkbox:checked').length > 0) {
            if (confirm("确定审核不通过吗？")){
                $.post("<@spring.url "/manage/companyInfo/unValidate"/>",{
                    companyId:companyId, contractId:contractId, str:str}, function (data) {
                    alert(data.message);
                });
            }
        } else {
            alert("请勾选错误信息。");
        }
    }

    function messagePass() {
        var contractId = $("#contractId").val();
        var companyId = $("#companyId").val();
        if (confirm("确定审核通过吗？")){
            $.post("<@spring.url "/manage/companyInfo/validate"/>",{
                companyId:companyId, contractId:contractId}, function (data) {
                alert(data.message);
            });
        }
    }

    function editInfo() {
        var contractId = $("#contractId").val();
        var companyId = $("#companyId").val();
        var detailId = $("#detailId").val();
        var companyName = $("#companyName").val();
        var creditCode = $("#creditCode").val();
        var operName = $("#operName").val();
        var address = $("#address").val();
        var elecFor = $("#elecFor").val();
        var contractName = $("#contractName").val();
        var contractPhone = $("#contractPhone").val();
        var wxNum = $("#wxNum").val();
        var cityId = $("#cityId").val();
        var capital = $("#capital").val();
        var voltageStep = $("#voltageStep").val();
        var accountNum = $("#accountNum").val();
        var elecAccount = $("#elecAccount").val();
        var transformerCapacity = $("#transformerCapacity").val();
        var elecConsumption = $("#elecConsumption").val();
        var detailCategory = $("#detailCategory").val();
        var bankName = $("#bankName").val();
        var bankAccountName = $("#bankAccountName").val();
        var bankAccount = $("#bankAccount").val();
        var contactPhone = $("#contactPhone").val();
        var fax = $("#fax").val();
        var tradeCycle = $("#tradeCycle").val();
        var startAt = $("#startAt").val();
        var endedAt = $("#endedAt").val();
        var description = $("#description").val();
        $.post("<@spring.url "/manage/companyInfo/update"/>",{
            companyId:companyId, contractId:contractId, detailId:detailId, companyName:companyName,
            creditCode:creditCode, operName:operName, address:address, elecFor:elecFor, contractName:contractName,
            contractPhone:contractPhone, wxNum:wxNum, cityId:cityId, capital:capital, voltageStep:voltageStep,
            accountNum:accountNum, elecAccount:elecAccount, transformerCapacity:transformerCapacity,
            elecConsumption:elecConsumption, detailCategory:detailCategory, bankName:bankName,
            bankAccountName:bankAccountName, bankAccount:bankAccount, contactPhone:contactPhone,
            fax:fax, tradeCycle:tradeCycle, startAt:startAt, endedAt:endedAt, description:description}, function (data) {
            alert(data.message);
        });



    }

</script>